/*******************************************************************************
 * Copyright (c) 2010, 2015 git@git.oschina.net:kaiwill/springstage.git
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package com.qinyeit.serviceapp.service.system;

import com.qinyeit.serviceapp.entity.system.ManagementPermission;
import com.qinyetech.springstage.core.entity.Status;
import com.qinyetech.springstage.core.service.IBaseService;

import java.util.List;
import java.util.Set;

/** 
 * ClassName: ManagementPermissionService <br/>
 * Function: 权限服务 <br/> 
 * date: 2015年10月6日 上午11:52:11 <br/> 
 * 
 * @author wuqing 
 * @version  
 * @since JDK 1.7 
 */
public interface ManagementPermissionService extends IBaseService<ManagementPermission, Long>
        ,PermissionInitialization<ManagementPermission>{
    /**
     * 查询所有一级权限
     * @return
     */
	public List<ManagementPermission> allPermission();

    /**
     * 根据账号id查找所有权限
     * @param id
     * @return
     */
	public Set<ManagementPermission> findPermissionBySystemAccountId(Long id);

    /**
     * 是否可以被删除
     * @return
     */
	public boolean distroyAble(ManagementPermission managementPermission);

    /**
     * 构建当前账号菜单
     * @return
     */
    public String  buildCurrentAccountMenuHtml(String contextPath);

    /**
     * 禁用启用
     * @param id
     * @param status
     */
    public void statusSwitch(Long id, Status status);

    /**
     * 获取权限串
     * @return
     */
    List<ManagementPermission> getPermission();
}
